/* $Id: symtab.h 18 2011-01-12 20:14:37Z dheater@heatertech.com $ */

#ifndef __SYMTAB_H
#define __SYMTAB_H

enum sym_type {
    SYM_UD,  /* Uninitialized double. */
    SYM_ID,  /* Initialized double. */
    SYM_UI,  /* Uninitialized int. */
    SYM_II,  /* Initialized int. */
    SYM_UB,  /* Uninitialized boolean. */
    SYM_IB,  /* Initialized boolean. */
};

typedef enum sym_type sym_type_t;

struct symrec {
    union {
        double *d;
        int *i;
        int *b;
    } value;
    sym_type_t sym_type;
    char *name;
    struct symrec *next;
};

typedef struct symrec symrec;

int putsym_d(char *ident, double *ptr);
int putsym_i(char *ident, int *ptr);
int putsym_b(char *ident, int *ptr);

symrec *getsym(char *ident);

#endif /* __SYMTAB_H */
